package com.tarry.service;

import com.tarry.config.TarryProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Slf4j
@Service
public class ConfigService {

    @Autowired
    TarryProperties tarryProperties;

    public HashMap<Object, Object> getConfigInfo() {
        HashMap<Object, Object> map = new HashMap<>();
        log.info("info {}", tarryProperties);
        map.put("name", tarryProperties.getName());
        map.put("age", tarryProperties.getAge());
        map.put("email", tarryProperties.getEmail());
        return map;
    }
}


